class CommentController {
  def scaffold = Comment

  def list = {
    if (!params.offset) params.offset = 0
    def topic = Topic.read(params.id)

    def results = Comment.createCriteria().list(max: 10, offset: params.offset) {
      eq("topic", topic)
    }

    [commentInstanceList: results, commentInstanceTotal: results.totalCount]
  }

  def latest = {
    render "not implemented yet!"
    //todo!
  }
}

